package com.hina.rec.endpoint.req.system;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 字典更新请求
 *
 * @author liaosp
 * @since 2024-04-17
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "字典更新请求")
public class DictUpdateReq {


    /**
     * 字典ID
     */
    @Schema(description = "字典ID", required = true)
    @NotNull(message = "字典ID不能为空")
    private Integer id;

    /**
     * 父主键
     */
    @NotNull(message = "父主键不能为空")
    @Schema(title = "父主键")
    private Integer parentId;
    
    /**
     * 字典类型，如性别、状态等
     */
    @Schema(description = "字典类型，如性别、状态等", required = true)
    @NotBlank(message = "字典类型不能为空")
    private String dictType;

    /**
     * 字典代码
     */
    @Schema(description = "字典代码", required = true)
    @NotBlank(message = "字典代码不能为空")
    private String dictCode;

    /**
     * 字典值，如男、女等
     */
    @Schema(description = "字典值，如男、女等", required = true)
    @NotBlank(message = "字典值不能为空")
    private String dictValue;

    /**
     * 显示顺序，越小越靠前
     */
    @Schema(description = "显示顺序，越小越靠前", required = true)
    @NotNull(message = "显示顺序不能为空")
    private Integer sort;

    /**
     * 字典状态(0停用，1启用)
     */
    @Schema(description = "字典状态(false停用，true启用)", required = true)
    @NotNull(message = "字典状态不能为空")
    private Boolean status;

    /**
     * 备注
     */
    @Schema(description = "备注")
    private String remark;
}